package problems;

public class Euler006 extends AbstractEuler {

	@Override
	public Number calculate() {
        long sums = 0;
        long sumSquares = 0;
        for (int i = 1; i <= 100; i++) {
            sums += i;
            sumSquares += i * i;
        }
        long squareSums = sums * sums;
        return Math.abs(sumSquares - squareSums);
	}

	@Override
	protected Number getCorrectAnswer() {
		return new Long(25164150);
	}

}
